package fr.utbm.gi.in56.ads;

import java.util.Date;

/**
 * Implementation of an ad of type buy.
 *
 * @author Adrien Hoffer & Tarik Belabbas
 *
 */
public class AdBuy extends Ad
{
	
	private int priceMin;
	private int priceMax;
	private int vehicleYearMin;
	private int vehicleYearMax;
	private int kmNbMin;
	private int kmNbMax;
	
	/**
	 * Default constructor
	 */
	public AdBuy()
	{
		super();
		this.kmNbMax		= -1;
		this.kmNbMin		= -1;
		this.priceMax		= -1;
		this.priceMin		= -1;
		this.vehicleYearMax = 0;
		this.vehicleYearMin	= 0;
	}
	
	/**
	 * Parameterized constructor
	 */
	public AdBuy(int _id, Date _adDate, int _adState, String _title, int _idBrand,
			String _brand, int _idModel, String _model, String _description, int _idEnergy,
			String _energy, int _isAutomatic, boolean _isChecked, String _loginBuyer,
			String _loginSeller, int _userCounty, int _userRate, int _kmNbMin,
			int _kmNbMax, int _priceMin, int _priceMax, int _vehicleYearMin,
			int _vehicleYearMax)
	{
		super(_id, _adDate, _adState, _title, _idBrand,_brand, _idModel, _model,
				_description, _idEnergy, _energy, _isAutomatic, _isChecked, _loginBuyer,
				_loginSeller, _userCounty, _userRate);
		
		this.kmNbMax		= _kmNbMax;
		this.kmNbMin		= _kmNbMin;
		this.priceMax		= _priceMax;
		this.priceMin		= _priceMin;
		this.vehicleYearMax = _vehicleYearMax;
		this.vehicleYearMin	= _vehicleYearMin;
	}
	
	/**
	 * Returns the minimum price of the car
	 *
	 * @return the priceMin
	 */
	public int getPriceMin()
	{
		return this.priceMin;
	}
	
	/**
	 * Sets the minimum price of the car
	 *
	 * @param priceMin the priceMin to set
	 */
	public void setPriceMin( int priceMin )
	{
		this.priceMin = priceMin;
	}
	
	/**
	 * Returns the maximum price of the car
	 *
	 * @return the priceMax
	 */
	public int getPriceMax()
	{
		return this.priceMax;
	}
	
	/**
	 * Sets the maximum price of the car
	 *
	 * @param priceMax the priceMax to set
	 */
	public void setPriceMax( int priceMax )
	{
		this.priceMax = priceMax;
	}
	
	/**
	 * Returns the minimum year of the car
	 *
	 * @return the vehicleYearMin
	 */
	public int getVehicleYearMin()
	{
		return this.vehicleYearMin;
	}
	
	/**
	 * Sets the minimum year of the car
	 *
	 * @param vehicleYearMin the vehicleYearMin to set
	 */
	public void setVehicleYearMin( int vehicleYearMin )
	{
		this.vehicleYearMin = vehicleYearMin;
	}
	
	/**
	 * Returns the year of the car
	 *
	 * @return the vehicleYearMax
	 */
	public int getVehicleYearMax()
	{
		return this.vehicleYearMax;
	}
	
	/**
	 * Sets the maximum year of the car
	 *
	 * @param vehicleYearMax the vehicleYearMax to set
	 */
	public void setVehicleYearMax( int vehicleYearMax )
	{
		this.vehicleYearMax = vehicleYearMax;
	}
	
	/**
	 * Returns the minimum number of kilometers
	 *
	 * @return the kmNbMin
	 */
	public int getKmNbMin()
	{
		return this.kmNbMin;
	}
	/**
	 * Sets the minimum number of kilometers
	 *
	 * @param kmNbMin the kmNbMin to set
	 */
	public void setKmNbMin( int kmNbMin )
	{
		this.kmNbMin = kmNbMin;
	}
	
	/**
	 * Returns the maximum number of kilometers
	 *
	 * @return the kmNbMax
	 */
	public int getKmNbMax()
	{
		return this.kmNbMax;
	}
	
	/**
	 * Sets the maximum number of kilometers
	 *
	 * @param kmNbMax the kmNbMax to set
	 */
	public void setKmNbMax( int kmNbMax )
	{
		this.kmNbMax = kmNbMax;
	}
	
	
}
